﻿@using PlatformNetCore.Entity;
@using Webdiyer.AspNetCore;
@model EmployeeInfo

<div class="banner banner-staff" style="background-image:url(@(Model.Ad != null && !string.IsNullOrWhiteSpace(Model.Ad.AdImagePC) ? Model.Ad.AdImagePC:"/img/banner/staff.jpg"))">
    <div class="txt">
        <div class="nav-container">
            <h1 class="text28 wow fadeInUp">@ViewBag.ParentTitle</h1>
            <ul class="nav wow fadeInUp">
                @foreach (Menu item in ViewBag.MenuTopSecond)
                {
                    <li><a href="@item.Link" class="@(item.MenuCode.Equals(ViewBag.MenuCode)?"active":"")">@item.Title</a></li>
                }
            </ul>
        </div>
    </div>
</div>
<div class="page page-leisure">
    @if (Model.News.Any())
    {
        <section class="s1 container">
            <div class="title-section wow fadeInUp">
                <h2 class="text28">员工分享</h2>
                <h3 class="text20">MOMENTS</h3>
            </div>
            <div class="artlist">
                <div class="row">
                    @foreach (var item in Model.News)
                    {
                        <div class="col-md-4">
                            <a class="item wow fadeInUp" href="/employee/leisuredetail?id=@item.ID">
                                <div class="pic"><img src="/image/447/262/@item.CoverImage" alt=""></div>
                                <div class="txt">
                                    <h2 class="text20">员工分享</h2>
                                    <p>@item.Title</p>
                                    <div class="time">@(item.PublishDate.HasValue ? item.PublishDate.Value.ToString("yyyy.MM.dd"):"--")</div>
                                </div>
                            </a>
                        </div>
                    }
                </div>
            </div>
        </section>
    }

    @if (Model.Images.Any())
    {
        <section class="s2">
            <div class="container">
                <div class="title-section wow fadeInUp">
                    <h2 class="text28">相关图片</h2>
                    <h3 class="text20">PHOTO</h3>
                </div>
                <div class="photolist">
                    <div class="row">
                        @foreach (var item in Model.Images)
                        {
                            <div class="col-6 col-md-4">
                                <div class="item wow fadeInUp"><img src="/image/447/322/@item.CoverImage" alt="@item.Title"></div>
                            </div>
                        }
                    </div>
                    <footer class="news-footer wow fadeInUp">
                        @Html.Pager((IPagedList)Model.Images, new PagerOptions()
                        {
                                ShowFirstLast = false,
                                PrevPageText = "<",
                                NextPageText = ">",
                                PageIndexParameterName = "pageindex",
                                NumericPagerItemCount = 5,
                                CssClass = "pagination text-center",
                                CurrentPagerItemTemplate = "<li class=\"page-item active\"><a class=\"page-link\" href=\"javascript:;\">{0}</a></li>",
                                DisabledPagerItemTemplate = "<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:;\">{0}</a></li>",
                                PagerItemTemplate = "<li class=\"page-item\">{0}</li>"
                        })
                    </footer>
                </div>
            </div>
        </section>
    }
</div>

